{% extends 'parent_module.html' %}

{% block nav %}
  <li class="nav-item">
    <a class="nav-link" href="/ielts">雅思</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="/TEM">TEM4/TEM8</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="/CET">CET4/CET6</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="/BEC">BEC</a>
  </li>
{% endblock %}

{% block content %}

  {% if query %}
    <h3>搜索结果如下：</h3>
    {% for result in page.object_list %}
      <a href="/{{ result.object.article_id }}/">{{ result.object.title }}</a><br />
    {% empty %}
      <p>啥也没找到</p>
    {% endfor %}

    {% if page.has_previous or page.has_next %}
      <div>
        {% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo;
        上一页{% if page.has_previous %}</a>{% endif %}
        |
        {% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}下一页 &raquo;
        {% if page.has_next %}</a>{% endif %}
      </div>
    {% endif %}
  {% endif %}

{% endblock %}